<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="__ROOT__/Public/Admin/shortcut icon" href="favicon.ico">
    <link href="__ROOT__/Public/Admin/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/animate.css" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/official.css" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="{:U('Admin/Stamp/index')}"><i class="fa fa-list-ol">
                    </i> 电子章管理</a>
                    </li>
                </ul>  
                 <form class="well form-search form-inline" method="post" action="">
                    <div class="form-group">
                        <input type="text" class="form-control" name="keyword"  value="{:I('request.keyword/s','')}" placeholder="请输入标识名称">
                    </div>
                    <input type="submit" class="btn btn-primary" value="搜索" /> 
                        &nbsp
                  <a class="edit-user label label-primary" id="{$vo.ID}" onclick="select('','不使用电子章')">不使用电子章</a>
                    
                </form>
                <table class="table table-bordered table-striped text-center" data-mobile-responsive="true">
                    <thead id="thead">
                        <tr>
                            <th style="width:10%">印章编号</th>
                            <th style="width:15%">印章名称</th>
                            <th style="width:10%">添加时间</th>
                            <th style="width:10%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        
                        <if condition="count($list) lt 1">
                            <tr> 
                                <td colspan="8" class="text-center">查无数据</td>
                            </tr>
                        <else />
                            <foreach name="list" item="vo">
                                <tr>
                                    <td>{$vo.ID}</td>
                                    <td>{$vo.Name}</td>
                                    <td>{$vo.AddTime}</td>
                                    <td>
                                    <a class="edit-user label label-primary" id="{$vo.ID}" onclick="select({$vo.ID},'{$vo.Name}')">选择</a>
                                     <a class="edit-user label label-primary" id="{$vo.ID}" href="<?=U('Admin/Stamp/veiw',array('ID'=>$vo['ID']))?>">查看详情</a>
                                    </td>
                                </tr>
                            </foreach> 
                        </if>
                    </tbody>
                </table>
                {$page}
            </div>
        </div>
    </div>
    <script src="__ROOT__/Public/Admin/js/jquery.js"></script>  
    <script src="__ROOT__/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
 <script>
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        //选择
        function select(id,name){
            parent.$('#StampID').val(id);
            parent.$('#StampID_Name').val(name);
            alert("选择成功");
            parent.layer.close(index);
            return false;
        }
 </script>
</body>
</html>